package com.cmc6.user.model.dto;

import com.cmc6.common.constant.BaseRegexConstant;
import com.cmc6.common.model.entity.UserIdDO;
import com.cmc6.user.model.entity.UserInfoDO;
import com.cmc6.user.model.entity.UserSecurityDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.Set;

/**
 * {@link UserInfoDO,UserIdDO,UserSecurityDO}
 */
@Data
public class UserInsertOrUpdateDTO {

    @ApiModelProperty(value = "主键id")
    private Long id;

    @Pattern(regexp = BaseRegexConstant.EMAIL)
    @ApiModelProperty(value = "邮箱，备注：邮箱和手机号必传一个")
    private String email;

    @ApiModelProperty(value = "前端加密之后的密码")
    private String password;

    @ApiModelProperty(value = "前端加密之后的明文密码")
    private String origPassword;

    @NotBlank
    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ApiModelProperty(value = "个性签名")
    private String personalStatement;

    @ApiModelProperty(value = "头像url")
    private String avatarUrl;

    @ApiModelProperty(value = "正常/冻结")
    private boolean enableFlag;

    @ApiModelProperty(value = "角色 idSet")
    private Set<Long> roleIdSet;

    @ApiModelProperty(value = "部门 idSet")
    private Set<Long> deptIdSet;

    @ApiModelProperty(value = "岗位 idSet")
    private Set<Long> jobIdSet;

    @Pattern(regexp = BaseRegexConstant.PHONE)
    @ApiModelProperty(value = "手机号，备注：邮箱和手机号必传一个")
    private String phone;

}
